Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support local transactions of ClickHouse under GraalVM Native Image #33801

Merged
merged 2 commits into from
Nov 26, 2024

Conversation

linghengqian
Copy link
Member

@linghengqian linghengqian commented Nov 25, 2024

For #29052.

Changes proposed in this pull request:

java.sql.BatchUpdateException: Code: 341. DB::Exception: Exception happened during execution of mutation 'mutation_6.txt' with part 'all_1_1_0' reason: 'Serialization error: part all_1_1_0 is locked by transaction 5672402456378293316'. This error maybe retryable or not. In case of unretryable error, mutation can be killed with KILL MUTATION query. (UNFINISHED) (version 24.10.2.80 (official build))


	at com.clickhouse.jdbc.SqlExceptionUtils.batchUpdateError(SqlExceptionUtils.java:107)
	at com.clickhouse.jdbc.internal.SqlBasedPreparedStatement.executeAny(SqlBasedPreparedStatement.java:223)
	at com.clickhouse.jdbc.internal.SqlBasedPreparedStatement.executeLargeUpdate(SqlBasedPreparedStatement.java:302)
	at com.clickhouse.jdbc.internal.AbstractPreparedStatement.executeUpdate(AbstractPreparedStatement.java:135)
	at com.zaxxer.hikari.pool.ProxyPreparedStatement.executeUpdate(ProxyPreparedStatement.java:61)
	at com.zaxxer.hikari.pool.HikariProxyPreparedStatement.executeUpdate(HikariProxyPreparedStatement.java)
	at org.apache.shardingsphere.driver.executor.callback.execute.ExecuteUpdateCallbackFactory$1.executeSQL(ExecuteUpdateCallbackFactory.java:55)
	at org.apache.shardingsphere.driver.executor.callback.execute.ExecuteUpdateCallbackFactory$1.executeSQL(ExecuteUpdateCallbackFactory.java:51)
	at org.apache.shardingsphere.infra.executor.sql.execute.engine.driver.jdbc.JDBCExecutorCallback.execute(JDBCExecutorCallback.java:85)
	at org.apache.shardingsphere.infra.executor.sql.execute.engine.driver.jdbc.JDBCExecutorCallback.execute(JDBCExecutorCallback.java:64)
	at org.apache.shardingsphere.infra.executor.kernel.ExecutorEngine.syncExecute(ExecutorEngine.java:99)
	at org.apache.shardingsphere.infra.executor.kernel.ExecutorEngine.parallelExecute(ExecutorEngine.java:95)
	at org.apache.shardingsphere.infra.executor.kernel.ExecutorEngine.execute(ExecutorEngine.java:78)
	at org.apache.shardingsphere.infra.executor.sql.execute.engine.driver.jdbc.JDBCExecutor.execute(JDBCExecutor.java:66)
	at org.apache.shardingsphere.infra.executor.sql.execute.engine.driver.jdbc.JDBCExecutor.execute(JDBCExecutor.java:50)
	at org.apache.shardingsphere.driver.executor.engine.pushdown.jdbc.DriverJDBCPushDownExecuteUpdateExecutor.doExecuteUpdate(DriverJDBCPushDownExecuteUpdateExecutor.java:110)
	at org.apache.shardingsphere.driver.executor.engine.pushdown.jdbc.DriverJDBCPushDownExecuteUpdateExecutor.lambda$executeUpdate$0(DriverJDBCPushDownExecuteUpdateExecutor.java:93)
	at org.apache.shardingsphere.driver.executor.engine.transaction.DriverTransactionalExecutor.execute(DriverTransactionalExecutor.java:56)
	at org.apache.shardingsphere.driver.executor.engine.pushdown.jdbc.DriverJDBCPushDownExecuteUpdateExecutor.executeUpdate(DriverJDBCPushDownExecuteUpdateExecutor.java:92)
	at org.apache.shardingsphere.driver.executor.engine.DriverExecuteUpdateExecutor.executeUpdate(DriverExecuteUpdateExecutor.java:80)
	at org.apache.shardingsphere.driver.executor.engine.facade.standard.StandardDriverExecutorFacade.executeUpdate(StandardDriverExecutorFacade.java:102)
	at org.apache.shardingsphere.driver.jdbc.core.statement.ShardingSpherePreparedStatement.executeUpdate(ShardingSpherePreparedStatement.java:224)
	at com.zaxxer.hikari.pool.ProxyPreparedStatement.executeUpdate(ProxyPreparedStatement.java:61)
	at com.zaxxer.hikari.pool.HikariProxyPreparedStatement.executeUpdate(HikariProxyPreparedStatement.java)
	at org.apache.shardingsphere.test.natived.commons.repository.OrderRepository.deleteInClickHouse(OrderRepository.java:320)
	at org.apache.shardingsphere.test.natived.commons.TestShardingService.deleteDataInClickHouse(TestShardingService.java:188)
	at org.apache.shardingsphere.test.natived.commons.TestShardingService.processSuccessInClickHouse(TestShardingService.java:85)
	at org.apache.shardingsphere.test.natived.jdbc.databases.ClickHouseTest.assertShardingInLocalTransactions(ClickHouseTest.java:106)
	at java.base/java.lang.reflect.Method.invoke(Method.java:580)
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1597)
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1597)

Before committing this PR, I'm sure that I have checked the following options:

  • My code follows the code of conduct of this project.
  • I have self-reviewed the commit code.
  • I have (or in comment I request) added corresponding labels for the pull request.
  • I have passed maven check locally : ./mvnw clean install -B -T1C -Dmaven.javadoc.skip -Dmaven.jacoco.skip -e.
  • I have made corresponding changes to the documentation.
  • I have added corresponding unit tests for my changes.
  • I have updated the Release Notes of the current development version. For more details, see Update Release Note

@linghengqian linghengqian force-pushed the acid-clickhouse branch 10 times, most recently from c50437b to 4bfe03f Compare November 26, 2024 07:44
@linghengqian linghengqian marked this pull request as ready for review November 26, 2024 08:07
@linghengqian linghengqian added this to the 5.5.2 milestone Nov 26, 2024
@strongduanmu strongduanmu merged commit 67c768c into apache:master Nov 26, 2024
148 checks passed
@linghengqian linghengqian deleted the acid-clickhouse branch November 26, 2024 08:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants